// 用 ES6 提供的支持

// function Person( name , gender , age ) { 
//     this.name = name;     this.gender = gender;     this.age = age;
// }
class Person {
    constructor(name, gender, age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }
}

// function Sinaean( name , gender , age ) { 
//     Person.call( this , name , gender , age );
// }
// Sinaean.prototype = new Person();
// Sinaean.prototype.constructor = Sinaean ;
class Sinaean extends Person {
    constructor(name, gender, age) {
        super(name, gender, age);
    }
}

// 因为 Sinaean 内部没有处理它的参数，所以这里传入的三个参数没意义
let s = new Sinaean("张三丰", 108, "男");

console.log(s.name, s.hasOwnProperty('name')); // 张三丰 true